package com.budwk.app.exception;

import com.budwk.starter.common.exception.BaseException;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author ZY.Wang
 * @since 2023/5/13
 */
public class ServiceException extends BaseException {

    private Integer code;

    public ServiceException(String message) {
        super(message);
        this.code = SqfwExceptionCodeEnum.SERVICE_ERROR.getCode();
    }

    public ServiceException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public ServiceException(SqfwExceptionCodeEnum codeEnum) {
        super(codeEnum.getMsg());
        this.code = codeEnum.getCode();
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
